package com.qifenqian.turbot.module.entity.response.order

import android.os.Parcelable
import com.chad.library.adapter.base.entity.AbstractExpandableItem
import com.chad.library.adapter.base.entity.MultiItemEntity
import com.qifenqian.turbot.module.adapter.order.LEVEL_1
import com.qifenqian.turbot.module.adapter.order.LEVEL_2
import kotlinx.android.parcel.Parcelize

/**
 * @author H
 * @createTime 2019/1/10 14:51
 * @description
 * @see
 * @since
 */
@Parcelize
data class OrderListEntity(
        var time: String,
        var orders: MutableList<OrderDetail>
                      ) : AbstractExpandableItem<OrderDetail>(), MultiItemEntity, Parcelable {

    override fun getItemType(): Int {
        return LEVEL_1
    }

    override fun getLevel(): Int {
        return 0
    }

}
@Parcelize
data class OrderDetail(
        var tableNo: String,
        var minPeopleNumber: Int,
        var maxPeopleNumber: Int,
        var time: String,
        var phone: String,
        var state: Int,
        var orderMoney: Int,
        var discountMoney: Int,
        var realMoney: Int
                      ) : MultiItemEntity, Parcelable {

    override fun getItemType(): Int {
        return LEVEL_2
    }
}